/*
 * Copyright 2022 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.mx.ymate.modbus;

import com.digitalpetri.modbus.slave.ServiceRequestHandler;
import net.ymate.platform.core.beans.annotation.Ignored;
import net.ymate.platform.core.support.IInitialization;

/**
 * @Author: mengxiang.
 * @Date 2025/11/10.
 * @Time: 16:00.
 * @Description:
 */
@Ignored
public interface IModbusConfig extends IInitialization<IModbus> {

    String ENABLED = "enabled";
    String AUTO_START = "autoStart";
    String HOST = "host";
    String PORT = "port";
    String SERVICE_REQUEST_HANDLER = "serviceRequestHandler";

    /**
     * 模块是否已启用, 默认值: true
     *
     * @return 返回false表示禁用
     */
    boolean isEnabled();

    /**
     * 是否自动启动服务
     * @return
     */
    boolean isAutoStart();

    /**
     * 主机地址 默认0.0.0.0
     * @return
     */
    String host();

    /**
     * modbus端口
     *
     * @return
     */
    int port();

    /**
     * 请求处理器
     * @return
     */
    ServiceRequestHandler serviceRequestHandler();


}
